package br.com.cnpv.modelo.dao;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;

import br.com.cnpv.modelo.acesso.idao.ITipoVeiculoDAO;
import br.com.cnpv.modelo.entity.TipoVeiculo;

public class TipoVeiculoDAO implements ITipoVeiculoDAO{

	@SuppressWarnings("unchecked")
	public List<TipoVeiculo> listar(Session session) throws HibernateException 
	{
		Query query = session.getNamedQuery("TipoVeiculo.listar");
		
		return query.list();
	}
}